﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Ext.Net;

namespace WEB.Core.Controls
{
    public class Msg
    {
        public static void Error(string message)
        {
            Msg.Show("Error", message, "ERROR");
        }
        public static void Informational(string message)
        {
            Msg.Show("Notice", message, "INFO");
        }
        public static void Question(string message)
        {
            Msg.Show("Notice", message, "QUESTION");
        }
        public static void Warning(string message)
        {
            Msg.Show("WARNING", message, "WARNING");
        }
        public static void Show(string title, string message,string icon)
        {
             X.Msg.Show(new MessageBoxConfig
            {
                Title = title,
                Message = message,
                Buttons = MessageBox.Button.OK,
                Icon = (MessageBox.Icon)Enum.Parse(typeof(MessageBox.Icon), icon),
                //AnimEl = this.Button8.ClientID,
                //Fn = new JFunction { Fn = "showResult" }
            });
        }
    }
}
